1. Field of Application
The present invention relates to an image encoding apparatus and method, and corresponding decoding apparatus and method for encoding and subsequently decoding an image which is expressed as a plurality of pixels, with the operation being based upon dividing the image into a plurality of blocks of pixels and encoding/decoding these blocks.
In particular the invention relates to an inter-block interpolative prediction encoding apparatus and method, whereby the encoding efficiency is enhanced by applying inter-block interpolation to predict the pixel values of certain blocks of an image, with only resultant sets of prediction error values being encoded for such blocks.
2. Prior Art Techology
One of the basic methods of data compression which is generally applied to images which are conveyed as respective frames of a digital video signal is to process each image as a plurality of blocks of pixels, and to utilize the correlation which generally occurs within each block to reduce the amount of code which is generated, i.e. apply intra-block encoding. Usually, pixel values of each block are subjected to DCT encoding, followed by quantization of the DCT coefficients and variable-length encoding, to thereby achieve a substantial degree of data compression.
However methods of inter-block encoding have also been proposed for utilizing the correlation which often exists between adjacent blocks, i.e., methods whereby blocks of an image are encoded based on pixel values of adjacent blocks which have already been encoded. An example of such a method is described in a paper entitled "An Image Data Compression Method using Extrapolative Prediction--Discrete Sine Transform; in the case of Two-Dimensional Coding", Conference on Electronic Information Communication document (B).J 71-No. 6 pp 717-724 (July, 1988, in Japan).
The basic principles of such a method are illustrated in the diagram of FIG. 18 showing part of a block-divided image which is being encoded, in which the cross-hatched region 301 consists of respective blocks which have already been encoded, while the blank region 300 consists of blocks which are yet to be encoded. Numeral 302 denotes a block which is currently being encoded, by extrapolative prediction based on pixel values of two adjacent blocks 303, 304 which have already been encoded.
FIG. 16 is a general system block diagram showing an example of a prior art type of intra-block predictive encoding apparatus which utilizes the principles described in the above reference. In the following description, video signal values expressing pixels, and prediction error signal values, etc. will be simply referred as pixel values, prediction error values, etc., for brevity of description. In FIG. 16, a raster-scan digital video signal is applied from an input terminal 1 to a block conversion section 51, in which each part of the video signal corresponding to an image is divided into a plurality of sets of pixel values corresponding to respective blocks of pixels, which are supplied to one input of a prediction subtractor 4. The prediction subtractor 4 subtracts from each pixel value a corresponding predicted value, to thereby obtain a prediction error value, which is input to an encoding section 52. As described in the above reference document, it is preferable for the encoding section 52 to apply DST (Discrete Sine Transform) processing rather than DCT processing when encoding the prediction error values which are obtained for respective pixels of a block by extrapolative prediction. For that reason, the set of prediction error values which are derived for a block are subjected to DST processing, followed by quantization of the resultant DST coefficients, and variable-length encoding. The resultant code is supplied to the output terminal 7, and also is input to the decoding section 55. The prediction error values which have thereby been encoded by the encoding section 52 are successively recovered through decoding processing which is applied by the decoding section 55. Each reconstructed prediction error value thus obtained is supplied to one input of a prediction adder 17. A predicted value for that pixel is generated at that time by the block prediction section 53 (based on reconstructed pixel values for adjacent pixels, read out from the block line memory 54) and supplied to the other input of the prediction adder 17, which thereby outputs a reconstructed pixel value for the pixel which is being processed. That reconstructed pixel value is stored in the block line memory 54.
The block line memory 54 stores the pixel values thus derived in units of blocks, as can be understood from FIG. 18, i.e. pixel values for successive rows of blocks are sequentially derived and stored in the block line memory 54, so that pixel values which are required for processing the block that is currently being encoded will always be available from the block line memory 54 when required.
FIG. 17 is a general system block diagram of an inter-block extrapolative prediction decoding apparatus corresponding to the inter-block extrapolative prediction encoding apparatus of FIG. 16. In FIG. 17, the input code stream is supplied via input terminal 21 to a decoding section 55, in which encoding including inverse DST processing is executed, to thereby recover respective prediction error values for the pixels of an image. Each such prediction error value is added in the prediction adder 17 to an inter-block prediction value for that pixel, which is generated by the block prediction section 53, to thereby obtain reconstructed pixel values. These pixel values are supplied to a raster conversion section 61 and to a block line memory 54. The raster conversion section 61 executes processing which is the inverse of that executed by the block conversion section 51 of FIG. 16, to thereby convert the pixel values from being arranged in units of blocks into a usual type of raster-scan video signal, which is supplied to an output terminal 24. The operation of the block line memory 54 and of the block prediction section 53 is identical to that of the encoding apparatus of FIG. 16, with reconstructed pixel values being stored in the block line memory 54 as successive rows of blocks, with appropriate reconstructed pixel values being read out from the block line memory 54 and supplied to the block prediction section 53 as required for deriving each predicted pixel value.
Such a method of inter-block encoding can provide higher encoding efficiency than is achieved by internally encoding all of the blocks of an image mutually independently. However it is difficult for such a method, based on extrapolation, to generate predicted pixel values which will accurately follow variations in the contents of an image. Furthermore such a method is entirely recursive, so that all of the predicted pixel values which are derived for a block (and hence, the resultant prediction error values which are encoded and transmitted) are based upon pixel values of adjacent blocks which have already been encoded, as illustrated by the arrow lines in block 302 of FIG. 18, with the latter pixel values being similarly dependent upon pixel values of preceding blocks. As a result, if an error arises in the code which is generated by the apparatus, i.e., an error occurring during transmission/receiving or recording/reproduction of the code, then at the time of decoding the received or reproduced code, the effects of such an error will propagate from the block in which the error occurs into all of the blocks which are subsequently decoded. Thus, even a low rate of occurrence of code errors can have a considerable adverse effect upon the resultant displayed video image.
The above problems arise from the fact that the encoding of an image occurs as a continuous flow in which each of the predicted pixel values is derived from reconstructed pixel values each of which has been derived from a predicted pixel value that was derived from reconstructed pixel values, and so on, with the operation being purely recursive. The problems also arise due to the fact that the prediction is extrapolative, being based upon pixel values of two adjacent blocks which are located along only two adjacent sides of the block which is being encoded. Thus for example in the case of the block 302 shown in FIG. 18, if the general level of the pixel values in the block 305 is substantially higher than that of the pixel values of block 304 and/or 303 (i.e., due to a sudden change in brightness level within the image), that fact will have no effect upon the predicted pixel values which are derived for the block 302 by the extrapolative prediction process. Thus, a method which would provide improved prediction accuracy is desirable.